#coding:utf-8
# list=['北京','北京','上海']
# print(list)
#
# tuple=("北京","北京","上海")
# print(tuple)
#
# # 集合里面不能有重复元素
# set={"北京","北京","上海"}
# print(set)
#
# # 定义空的集合不能用{},用set
# set={"北京"}
# print(set)
# print(type(set))
#
# # print(set())
#
# set=set({"北京","上海"})
# print(type(set))
# print(set)



# 集合运算
data={"北京","上海","广州","深圳"}
dataOther={"北京","上海","广州","杭州"}

# 交集
print(data&dataOther)

# 并集
print(data| dataOther)

# 差集
print(data-dataOther)
print(dataOther-data)

#不同时存在
print(data^dataOther)

